﻿using System;


namespace QSharpTest.Utility
{
    class RandomSequenceGenerator
    {
        public RandomSequenceGenerator(Random r)
        {
            mRandom = r;
        }

        public RandomSequenceGenerator(int seed)
        {
            mRandom = new Random(seed);
        }

        public RandomSequenceGenerator()
        {
            mRandom = new Random();
        }

        public int Get(int nMin, int nMax)
        {
            return mRandom.Next(nMin, nMax);
        }

        public int[] Get(int n, int nMin, int nMax)
        {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = mRandom.Next(nMin, nMax);
            }
            return a;
        }

        protected Random mRandom;
    }
}
